/*
 * @Author: yuluo
 * @Date: 2025-08-28
 * @LastEditors: yuluo
 * @LastEditTime: 2025-09-05
 * @FilePath: \Projecte:\gitee\GD32F427\gd32-f427-BootLoader\App\src\app_timer.c
 * @Description: 
 * 如有特殊注意事项请填写
 * Copyright (c) by ${yuluo}, All Rights Reserved. 
 */

#include "main.h"

sys_timer_t sys_timer;

/**
 * @description: 
 * @param {uint64_t} start_timer 起始时间
 * @param {uint64_t} interval_timer 时间间隔
 * @return {*}
 */
uint8_t System_Time_Interval(uint64_t start_timer, uint64_t interval_timer)
{
    if(sys_timer.System_Timeline >= start_timer)
    {
        if(sys_timer.System_Timeline > (start_timer + interval_timer))
        {
            return SUCCESS;
        }
    }
    return ERROR;
}

/**
 * @description: 
 * @return {*}
 */
void system_timer_init(void)
{
    sys_timer.System_Timeline = 0;
    sys_timer.System_10ms = 0;
}
